#ifndef LAURIN_CAPTURE_INTERFACE_H_
#define LAURIN_CAPTURE_INTERFACE_H_

#include <glibmm/ustring.h>
#include <pcap.h>

class LaurinCaptureInterface
{
	public:

		virtual ~LaurinCaptureInterface();

		pcap_t* getCaptureContext() const;
		int getDataLayerLink() const;

		bool isCaptureContextOpen() const;
		bool setCaptureFilter(const Glib::ustring& filterSTM, int subnetMask);



	protected:

		LaurinCaptureInterface(const Glib::ustring& ifaceName);
		void openCaptureContext();
		virtual bool setCaptureOptions();

	private:

		pcap_t* _context;						// the capture context
		int _datalayer;							// datalink layer value
		Glib::ustring _cIfaceName;				// the iface name

		void closeCaptureContext();
};

#endif
